import Https from "@/utils/Https";

export const queryPageDataReq = async (params) =>
  await Https.post("/tables", params);

export const addItemReq = async (params) => await Https.post("/tables", params);
export const updateItemReq = async (params) =>
  await Https.post("/tables", params, true);
export const deleteItemReq = async (params) =>
  await Https.post("/tables", params, true);

export const queryItemInfoReq = async (params) =>
  await Https.post("/tables", params);

export const toggleStateReq = async (params) =>
  await Https.post("/tables", params, true);
//获取所有场馆
export const getAllVenueListFun = async (params) =>
  await Https.post("/course/venueAllList", params, true);
//获取所有教室
export const getAllClassRoomFun = async (params) =>
  await Https.post("/course/sched/classRoomAllList", params, true);
//指定场馆下的所有课程
export const getCourseListFun = async (params) =>
  await Https.get("/course/sched/courseAllList", params, true);
//所有教练
export const getCoachListFun = async (params) =>
  await Https.get("/employee/manage/listCoach", params);
//查询排课表
export const getScheduleListFun = async (params) =>
  await Https.post("/course/sched/scheduleList", params);
//新增排课
export const addScheduleFun = async (params) =>
  await Https.post("/course/sched/addSchedule", params, true);
//排课的周数据
export const timeWeekFun = async (params) =>
  await Https.post("/course/sched/timeWeek", params, true);
//签到
export const signInFun = async (params) =>
  await Https.post(
    `/course/sched/signIn?classCode=${params.classCode}`,
    {},
    true
  );
//根据上课码查询排课表明细
export const getScheduleDetailFun = async (params) =>
  await Https.post(
    `/course/sched/checkClassCode?classCode=${params}`,
    params,
    true
  );
//清空排课表
export const clearScheduleFun = async (params) =>
  await Https.post(`/course/sched/clear`, params, true);
//清空排课表
export const copyScheduleFun = async (params) =>
  await Https.post(`/course/sched/copy`, params, true);
